//
// Created by ASUS on 2023/10/8.
//

#include <bits/stdc++.h>
using namespace std;

const int MX=1e5+5;
int Fa[MX],Rank[MX];
//初始化
void Init(int n){
	for(int i=1;i<=n;i++){
		Fa[i]=i;
		Rank[i]=1;
	}
}
//查询
int Find(int x){
	return Fa[x]==x?x:Fa[x]= Find(Fa[x]);
}
//合并
void Union(int i,int j){
	int x=Find(i),y=Find(j);
	if(Rank[x]<=Rank[y]) Fa[x]=y;
	else Fa[y]=x;
	if(Rank[x]==Rank[y]&&x!=y) Rank[y]++;
	Fa[Find(x)]=Find(y);
}

int main(){

	return 0;
}